unit dbcDBOptions;
// Database Comparer VCL v.3.0
// Copyright (C) 1998-2006, by Boris Loboda
// www.CleverComponents.com
{$I Comparer.INC}

// Database options.
interface

Uses SysUtils, Classes, dbcTypes;

type
  // InterBase - SQL Dialect
  TIBSQLDialectType = 1..3;
  // InterBase - Server Version: keywords and features
  TIBSQLServerVersionType  = (
                             st_InterBase_4x,
                             st_InterBase_5x,
                             st_InterBase_6x,
                             st_FireBird_1x,
                             st_Yaffil_1x,
                             st_FireBird_15,
                             st_InterBase_7x,
                             // Removed by AVX: st_FireBird_2x,
                             // AVX -->
                             st_Firebird_20,
                             st_Firebird_21,
                             st_Firebird_25,
                             st_Firebird_30,
                             // <-- AVX
                             st_InterBase_75
                             );

  TMSSQLServerVersionType  = (st_MSSQL2000,
                              st_MSSQL2005,
                              st_MSSQL2008);

  TASAServerVersionType    = (st_ASA5, st_ASA6, st_ASA7, st_ASA8, st_ASA9);
  TASEServerVersionType    = (st_ASE12);
  TPGSQLServerVersionType  = (st_PostgreSQL_7x, st_PostgreSQL_8x, st_PostgreSQL_9x);
  TMySQLServerVersionType  = (st_MySQL_3x, st_MySQL_4x, st_MySQL_5x);
  TOracleServerVersionType = (st_Oracle_7x, st_Oracle_8x, st_Oracle_9x, st_Oracle_10x, st_Oracle_11x);
  TDB2ServerVersionType    = (st_DB2_8x);

const

  IBServerVersionStr =
                       'InterBase 4.x' + CrLf +
                       'InterBase 5.x' + CrLf +
                       'InterBase 6.x' + CrLf +
                       'FireBird 1.x'  + CrLf +
                       'Yaffil 1.x'    + CrLf +
                       'FireBird 1.5'  + CrLf +
                       'InterBase 7.x' + CrLf +
                       'FireBird 2.0'  + CrLf +
                       'FireBird 2.1'  + CrLf +
                       'FireBird 2.5'  + CrLf +
                       'FireBird 3.0'  + CrLf +
                       'InterBase 7.5';

  MSSQLServerVersionStr =
                       'MS SQL 2000' + CrLf +
                       'MS SQL 2005' + CrLf +
                       'MS SQL 2008';

  ASAServerVersionStr =
                       'ASA 5' + CrLf +
                       'ASA 6' + CrLf +
                       'ASA 7' + CrLf +
                       'ASA 8' + CrLf +
                       'ASA 9';

  ASEServerVersionStr =
                       'ASE 12';

  MySQLServerVersionStr =
                       'My SQL 3.x' + CrLf +
                       'My SQL 4.x' + CrLf +
                       'My SQL 5.x';

  OracleServerVersionStr =
                       'Oracle 7.x' + CrLf +
                       'Oracle 8.x' + CrLf +
                       'Oracle 9.x' + CrLf +
                       'Oracle 10.x' + CrLf +
                       'Oracle 11.x';

  PGSQLServerVersionStr =
                       'PostgreSQL 7.x' + CrLf +
                       'PostgreSQL 8.x' + CrLf +
                       'PostgreSQL 9.x';
  DB2ServerVersionStr   =
                       'DB2 8.x';

type

  // database connection
  TConnectionOptions = Class(TPersistent)
  private
    fDatabaseName: String;
    // Extracted parameters
    fUserName, fPassword, fRoleName: String;
    // if parameters read on LoginPrompt = True
    fDBUserName, fDBPassword, fDBRoleName: String;
    fPort: Integer;
    fHostName: string;
    fProtocol: TDBCProtocol;
    fWindowsAuthentication: Boolean;
    fConnectionString: string;
    fClientLibrary: TFileName;
  protected
    procedure AssignTo(Dest: TPersistent); override;
    function GetClientLibrary(): TFileName;
    procedure SetDatabaseName(aName: String);
  public
    constructor Create();
    procedure Assign(Source: TPersistent); override;
    procedure Clear();
    property DBUserName: String read fDBUserName write fDBUserName;
    property DBPassword: String read fDBPassword write fDBPassword;
    property DBRoleName: String read fDBRoleName write fDBRoleName;
  published
    property DatabaseName: String read fDatabaseName write SetDatabaseName;
    property UserName: String read fUserName write fUserName;
    property Password: String read fPassword write fPassword;
    property RoleName: String read fRoleName write fRoleName;
    property Port: Integer read fPort write fPort default 0;
    property HostName: string read fHostName write fHostName;
    property UseWindowsAuthentication: Boolean read fWindowsAuthentication
                                            write fWindowsAuthentication default False;
    property ConnectionString: String read fConnectionString write fConnectionString;
    property Protocol: TDBCProtocol read fProtocol write fProtocol default ptTCP;
    property ClientLibrary: TFileName read GetClientLibrary write fClientLibrary;
  end;

  // IB database information
  TIBDatabaseOptions = class(TPersistent)
  private
    fServerVersion: String;
    fServerImplementation: String;
    fODSMajorVersion: Integer;
    fODSMinorVersion: Integer;
    fPageSize: Integer;
    fForcedWrites: Integer;
    fSweepInterval: Integer;
    fReadOnly: Integer;
    fNumBuffers: Integer;
    fDBImplementationNo: Integer;
    fDBImplementationClass: Integer;
    fDBSQLDialect: Integer;
  protected
    procedure AssignTo(Dest: TPersistent); override;
  public
    procedure Assign(Source: TPersistent); override;
    procedure Clear();
    property ServerVersion: string read fServerVersion write fServerVersion;
    property ServerImplementation: string read fServerImplementation write fServerImplementation;
    property DBImplementationNo: Integer read fDBImplementationNo write fDBImplementationNo;
    property DBImplementationClass: Integer read fDBImplementationClass write fDBImplementationClass;
    property ODSMajorVersion: Integer read fODSMajorVersion write fODSMajorVersion;
    property ODSMinorVersion: Integer read fODSMinorVersion write fODSMinorVersion;
    property PageSize: Integer read fPageSize write fPageSize;
    property ForcedWrites: Integer read fForcedWrites write fForcedWrites;
    property SweepInterval: Integer read fSweepInterval write fSweepInterval;
    property ReadOnly: integer read fReadOnly write fReadOnly;
    property NumBuffers: Integer read fNumBuffers write fNumBuffers;
    property DBSQLDialect: Integer read fDBSQLDialect write fDBSQLDialect;
    function Def(): String;
  end;

  // IB compare options
  TIBCompareOptions = Class(TPersistent)
  protected
    // compare and update Database DEFAULT CHARACTER SET
    fDbCharSetCompare: Boolean;
    // compare and update Fields CHARACTER SET
    fFldCharSetCompare: Boolean;
    // Update Description: system tables / describe-statement
    fUpdateDescription: TUpdateDescriptionType;
    fModifySystemTables: Boolean; // ... to change domain/field datatype
    fGenerateCOMMIT: Boolean;
    fUseReConnect: Boolean;
    fAllowDataTypeConversion: Boolean;
    fUpdateFieldPosition: Boolean;
    fExtractOnlyCmpObjs: Boolean;
    fIgnoreIBEObjects: Boolean;
    procedure AssignTo(Dest: TPersistent); override;
    procedure SetUpdateDescriptionMode(aDescriptionMode: TUpdateDescriptionType);
  public
    procedure Assign(Source: TPersistent); override;
    constructor Create();
    procedure Clear();
  published
    // Compare database default character set
    property DbCharsetCompare: Boolean read fDbCharsetCompare
                                       write fDbCharsetCompare
                                       default False;
    // Compare charset/collation for domains/fields
    property FldCharsetCompare: Boolean read fFldCharsetCompare
                                       write fFldCharsetCompare
                                       default False;
    // Update descrioption: via system tables / Describe-statement (IBExpert)
    property UpdateDescriptionMode: TUpdateDescriptionType
                                    read fUpdateDescription
                                    write SetUpdateDescriptionMode
                                    default udSysTables;
    // Modyfy system tables to change domain/field datatype:
    // True  - Update RDB$FIELD_TYPE into RDB$FIELDS
    // False - Use ALTER DOMAIN, ALTER COLUMN statement
    property ModifySystemTables: Boolean
                                 read fModifySystemTables
                                 write fModifySystemTables
                                 default False;
    property GenerateCOMMIT: Boolean read fGenerateCOMMIT
                                     write fGenerateCOMMIT
                                     default False;
    property UseRECONNECT: Boolean read fUseReConnect
                                   write fUseReConnect
                                   default True;
    property AllowDataTypeConversion: Boolean read fAllowDataTypeConversion
                                              write fAllowDataTypeConversion
                                              default False;
    property UpdateFieldPosition: Boolean read fUpdateFieldPosition
                                          write fUpdateFieldPosition
                                          default True;
    property ExtractOnlyComparedObjects: Boolean read fExtractOnlyCmpObjs
                                                 write fExtractOnlyCmpObjs
                                                 default True;
    property IgnoreIBEObjects: Boolean read fIgnoreIBEObjects
                                        write fIgnoreIBEObjects
                                        default True;
  end;

  TIBServerOptions = class(TPersistent)
  private
    fServerVersion: TIBSQLServerVersionType;
    fSQLDialect: TIBSQLDialectType;
    fDBCharSet: String;
    fIBCompareOptions: TIBCompareOptions;
    fIBDatabaseOptions: TIBDatabaseOptions;
    procedure SetServerVersion(aVersion: TIBSQLServerVersionType);
    function GetServerVersion(): TIBSQLServerVersionType;
    procedure SetCompareOptions(aOptions: TIBCompareOptions);
    procedure SetDatabaseOptions(aOptions: TIBDatabaseOptions);
    procedure SetSQLDialect(aDialect: TIBSQLDialectType);
    procedure SetDbCharSet(aCharSet: String);
  protected
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create();
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); override;
    procedure Clear();
    procedure ExtractDatabaseParams(aParams: TStrings; aConnectionOptions: TconnectionOptions);
    function DBCharSetDef(): string;
    function SQLDialectDef(): string;
    function CreateDatabaseDef(aConnectionOptions: TConnectionOptions): String;
    function ConnectDatabaseDef(aConnectionOptions: TConnectionOptions): String;
    function DBInfoDef(): string;
    function ODS_GE10(): Boolean;
    function ConnectHeaderDef(aConnectionOptions: TConnectionOptions): String;
    property SQLServerVersion: TIBSQLServerVersionType read GetServerVersion
                                                       write SetServerVersion
                                                       default st_FireBird_15;
    property IBDatabaseOptions: TIBDatabaseOptions read fIBDatabaseOptions
                                                   write SetDatabaseOptions;
    property IBCompareOptions: TIBCompareOptions read fIBCompareOptions
                                                 write SetCompareOptions;
    // InterBase SQL DIALECT
    property SQLDialect: TIBSQLDialectType read fSQLDialect
                                           write SetSQLDialect default 3;
    property DBCharSet: String read fDBCharSet write SetDBCharSet;
  end;

  TMSSQLCompareOptions = class(TPersistent)
  protected
    fIgnoreFileGroup: Boolean;
    fIgnoreSysName: Boolean;
    fCaseSensitiveIdentifiers: Boolean;
    fUpdateColumnPosition: Boolean;
    procedure AssignTo(Dest: TPersistent); override;
  public
    procedure Assign(Source: TPersistent); override;
    constructor Create;
    procedure Clear;
  published
    property IgnoreFileGroup: Boolean read fIgnoreFileGroup write fIgnoreFileGroup default False;
    property IgnoreSysName: Boolean read fIgnoreSysName write fIgnoreSysName default True;
    property CaseSensitiveIdentifiers: Boolean read fCaseSensitiveIdentifiers write fCaseSensitiveIdentifiers default False;
    property UpdateColumnPosition: Boolean read fUpdateColumnPosition write fUpdateColumnPosition default False;
  end;

  TMSSQLDatabaseOptions = class(TPersistent)
  protected
    fCollation: String;
    fAnsiNullDefault: Boolean;
    fAnsiNullsEnabled: Boolean;
    fQuotedIdentifiersEnabled: Boolean;
    fRecursiveTriggersEnabled: Boolean;
    fVersion: Integer; // <> 0 - database info assigned
    fCompatibilityLevel: Integer;
    procedure AssignTo(Dest: TPersistent); override;
  public
    procedure Assign(Source: TPersistent); override;
    procedure Clear;
    property Collation: String read fCollation write fCollation;
    property AnsiNullDefault: Boolean
             read fAnsiNullDefault
             write fAnsiNullDefault
             default False;
    property AnsiNullsEnabled: Boolean
             read fAnsiNullsEnabled
             write fAnsiNullsEnabled
             default False;
    property QuotedIdentifiersEnabled: Boolean
             read fQuotedIdentifiersEnabled
             write fQuotedIdentifiersEnabled
             default False;
    property RecursiveTriggersEnabled: Boolean
             read fRecursiveTriggersEnabled
             write fRecursiveTriggersEnabled default False;
    property Version: Integer read fVersion write fVersion default 0;
    property CompatibilityLevel: integer
             read fCompatibilityLevel
             write fCompatibilityLevel
             default 0;
  end;

  TMSSQLServerOptions = class(TPersistent)
  private
    fDBCharSet: String;
    fCollation: String;
    fServerVersion: TMSSQLServerVersionType;
    fCompareOptions: TMSSQLCompareOptions;
    fDatabaseOptions: TMSSQLDatabaseOptions;
    procedure SetCompareOptions(aOptions: TMSSQLCompareOptions);
    procedure SetDatabaseOptions(aOptions: TMSSQLDatabaseOptions);
    procedure SetServerVersion(aVersion: TMSSQLServerVersionType);
  protected
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); override;
    procedure Clear();
    property MSSQLDatabaseOptions: TMSSQLDatabaseOptions read fDatabaseOptions write SetDatabaseOptions;
  published
    property SQLServerVersion: TMSSQLServerVersionType
                               read fServerVersion
                               write SetServerVersion
                               default st_MSSQL2000;
    property Collation: string read fCollation write fCollation;
    property DBCharSet: string read fDBCharSet write fDBCharSet;
    property MSSQLCompareOptions: TMSSQLCompareOptions read fCompareOptions write SetCompareOptions;
  end;

  TMySQLCompareOptions = class(TPersistent)
  protected
    fCaseSensitiveIdentifiers: Boolean;
    procedure AssignTo(Dest: TPersistent); override;
public
    constructor Create();
    procedure Clear();
    procedure Assign(Source: TPersistent); override;
  published
    property CaseSensitiveIdentifiers: Boolean read fCaseSensitiveIdentifiers
                                               write fCaseSensitiveIdentifiers
                                               default True;
  end;

  TMySQLServerOptions = class(TPersistent)
  protected
    fServerVersion: TMySQLServerVersionType;
    fCharSet: String;
    fNames: String;
    fCompareOptions: TMySQLCompareOptions;
    procedure AssignTo(Dest: TPersistent); override;
    procedure SetCompareOptions(aOptions: TMySQLCompareOptions);
  public
    constructor Create;
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); override;
    procedure Clear();
  published
    property SQLServerVersion: TMySQLServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_MySQL_5x;
    property CharSet: String read fCharSet write fCharSet;
    property Names: String read fNames write fNames;
    property MySQLCompareOptions: TMySQLCompareOptions read fCompareOptions
                                                  write SetcompareOptions;
  end;

  TASACompareOptions = class(TPersistent)
  protected
    fCaseSensitiveIdentifiers: Boolean;
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    procedure Assign(Source: TPersistent); override;
    procedure Clear;
  published
    property CaseSensitiveIdentifiers: Boolean
                                   read fCaseSensitiveIdentifiers
                                   write fCaseSensitiveIdentifiers
                                   default False;
  end;

  TASADatabaseOptions = class(TPersistent)
  protected
    fQuotedIdentifier: Boolean;
    fAnsiNull: Boolean;
    fDefCollation: String;
    fStatistics: Integer;
    fDate_Order: string;
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    procedure Assign(Source: TPersistent); override;
    procedure Clear;
    property QuotedIdentifier: Boolean read fQuotedIdentifier write fQuotedIdentifier default True;
    property AnsiNull: Boolean read fAnsiNull write fAnsiNull default True;
    property DefaultCollation: String read fDefCollation write fDefCollation;
    property Statistics: integer read fStatistics write fStatistics default 0;
    property Date_Order: string read fDate_Order write fDate_Order;
  end;

  TASAServerOptions = class(TPersistent)
  protected
    fServerVersion: TASAServerVersionType;
    fCompareOptions: TASACompareOptions;
    fDatabaseOptions: TASADatabaseOptions;
    procedure SetDatabaseOptions(aOptions: TASADatabaseOptions);
    procedure SetCompareOptions(aOptions: TASACompareOptions);
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Clear;
    procedure Assign(Source: TPersistent); override;
    property ASADatabaseOptions: TASADatabaseOptions
                                    read fDatabaseOptions
                                    write SetDatabaseOptions;
  published
    property SQLServerVersion: TASAServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_ASA9;
    property ASACompareOptions: TASACompareOptions
                                   read fCompareOptions
                                   write SetCompareOptions;
  end;

  TOracleServerOptions = class(TPersistent)
  protected
    fServerVersion: TOracleServerVersionType;
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Clear;
    procedure Assign(Source: TPersistent); override;
  published
    property SQLServerVersion: TOracleServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_Oracle_10x;
  end;

  TPGSQLServerOptions = class(TPersistent)
  protected
    fServerVersion: TPGSQLServerVersionType;
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Clear;
    procedure Assign(Source: TPersistent); override;
  published
    property SQLServerVersion: TPGSQLServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_PostgreSQL_8x;
  end;

  TDB2ServerOptions = class(TPersistent)
  protected
    fServerVersion: TDB2ServerVersionType;
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Clear;
    procedure Assign(Source: TPersistent); override;
  published
    property SQLServerVersion: TDB2ServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_DB2_8x;
  end;

    {
    abort tran on log full
    allow nulls by default
    async log service
    auto identity
    dbo use only
    ddl in tran
    disable alias access
    identity in nonunique index
    no chkpt on recovery
    no free space acctg
    read only
    select into/bulkcopy/pllsort
    single user
    trunc log on chkpt
    trunc. log on chkpt.
    unique auto_identity index
    }
  TASEDBOption = (asedboAbortTranOnLogFull,
                  asedboAllowNullsByDefault,
                  asedboAsyncLogService,
                  asedboAutoIdentity,
                  asedboDboUseOnly,
                  asedboDdlInTran,
                  asedboDisableAliasAccess,
                  asedboIdentityInNonUniqueIndex,
                  asedboNoChkptOnRecovery,
                  asedboNoFreeSpaceAcctg,
                  asedboReadOnly,
                  asedboSelectIntoBulkCopyPllSort,
                  asedboSingleUser,
                  asedboTruncLogOnChkpt,
                  asedboUniqueAutoIdentityIndex);
  TASEDBOptions = set of TASEDBOption;

  TASEDatabaseOptions = class(TPersistent)
  protected
    fServerVersion: String;
    fDbSize: Integer;
    fLogSize: Integer;
    fDbOptions: String;
    fDb_Size: String;
    fDbOwner: String;
    fDbCreated: String;
    fCollation: String;
    fAnsiNullDefault: Boolean;
    fAnsiNullsEnabled: Boolean;
    fQuotedIdentifiersEnabled: Boolean;
    fRecursiveTriggersEnabled: Boolean;
    fVersion: Integer; // <> 0 - database info assigned
    AbortTranOnLogFull: Boolean;
    fASEDBOptions: TASEDBOptions;
    procedure AssignTo(Dest: TPersistent); override;
  public
    procedure Assign(Source: TPersistent); override;
    procedure Clear;
    property Collation: String read fCollation write fCollation;
    property AnsiNullDefault: Boolean
             read fAnsiNullDefault
             write fAnsiNullDefault
             default False;
    property AnsiNullsEnabled: Boolean
             read fAnsiNullsEnabled
             write fAnsiNullsEnabled
             default False;
    property QuotedIdentifiersEnabled: Boolean
             read fQuotedIdentifiersEnabled
             write fQuotedIdentifiersEnabled
             default False;
    property RecursiveTriggersEnabled: Boolean
             read fRecursiveTriggersEnabled
             write fRecursiveTriggersEnabled default False;
    property Version: Integer read fVersion write fVersion default 0;
    property ServerVersion: String read fServerVersion write fServerVersion;
    property DbSize: integer read fDbSize write fDbSize;
    property LogSize: Integer read fLogSize write fLogSize;
    property DbOptions: String read fDbOptions write fDbOptions;
    property Db_Size: String read fDb_Size write fDb_Size;
    property DbOwner: String read fDbOwner write fDbOwner;
    property DbCreated: String read fDbCreated write fDbCreated;
    property ASEDBOptions: TASEDBOptions read fASEDBOptions write fASEDBOptions;
    function DBOptionStr(aOption: TASEDBOption): String;
  end;

  TASECompareOptions = class(TPersistent)
  protected
    fIgnoreFileGroup: Boolean;
    fIgnoreSysName: Boolean;
    fCaseSensitiveIdentifiers: Boolean;
    fCompareDBOptions: Boolean;
    procedure AssignTo(Dest: TPersistent); override;
  public
    procedure Assign(Source: TPersistent); override;
    constructor Create;
    procedure Clear;
  published
    property IgnoreFileGroup: Boolean
             read fIgnoreFileGroup
             write fIgnoreFileGroup default False;
    property IgnoreSysName: Boolean
             read fIgnoreSysName
             write fIgnoreSysName default True;
    property CaseSensitiveIdentifiers: Boolean
             read fCaseSensitiveIdentifiers
             write fCaseSensitiveIdentifiers default False;
    property CompareDBOptions: Boolean
             read fCompareDBOptions
             write fCompareDBOptions default True;
  end;

  TASEServerOptions = class(TPersistent)
  protected
    fServerVersion: TASEServerVersionType;
    fCompareOptions: TASECompareOptions;
    fDatabaseOptions: TASEDatabaseOptions;
    procedure AssignTo(Dest: TPersistent); override;
    procedure SetCompareOptions(aOptions: TASECompareOptions);
    procedure SetDatabaseOptions(aOptions: TASEDatabaseOptions);
  public
    constructor Create;
    destructor Destroy; override;
    procedure Clear;
    procedure Assign(Source: TPersistent); override;
    property ASEDatabaseOptions: TASEDatabaseOptions read fDatabaseOptions write SetDatabaseOptions;
  published
    property SQLServerVersion: TASEServerVersionType
                               read fServerVersion
                               write fServerVersion
                               default st_ASE12;
    property ASECompareOptions: TASECompareOptions read fCompareOptions write SetCompareOptions;
  end;

  TMySQLTableOptions = class(TPersistent)
  protected
    fDefCharSet: String;
    procedure SetDefCharSet(aValue: String);
  public
    Engine: String;
    AutoIncrement: Integer;
    AvgRowLength: integer;
    CheckSum: integer;
    DefCollate: String;
    Comment: String;
    Connection: String;
    DataDirectory: string;
    DelayKeyWrite: integer;
    IndexDirectory: String;
    InsertMethod: string;
    KeyBlockSize: Integer;
    MaxRows: integer;
    MinRows: integer;
    PackKeys: String;
    Password: String;
    RowFormat: String;
    RaidType: String;
    Union: String;
    property DefCharSet: String read fDefCharSet write SetDefCharSet;
    destructor Destroy; override;
    function Def(): String;
  end;

  TIBComparerOptions = class(TIBServerOptions)
  published
    // InterBase server version
    property SQLServerVersion;
    property IBCompareOptions;
  end;

  TIBSQLExecOptions = Class(TIBServerOptions)
  published
    // InterBase server version
    property SQLServerVersion;
    property IBCompareOptions;
  end;

  TIBExtractOptions = Class(TIBServerOptions)
  published
    // InterBase server version
    property SQLServerVersion;
  end;

  TIBTableDataComparerOptions = class(TIBServerOptions)
  published
    property SQLDialect;
    property SQLServerVersion;
  end;

  TIBEngineOptions = Class(TIBServerOptions)
  published
    property SQLDialect;
    property SQLServerVersion;
    property DBCharSet;
  end;

  TScriptOptions = class(TPersistent)
  private
    fGenerateScript: Boolean;
    fConnect: Boolean;
    fSQLDialect: Boolean;
    fDBCharSet: Boolean;
    fLocalSQL: Boolean;
    fFloatFormat: String;
    fDateFormat: String;
    fTimeFormat: String;
    fDateTimeFormat: String;
  protected
    procedure AssignTo(Dest: TPersistent); override;
  public
    constructor Create();
    procedure Assign(Source: TPersistent); override;
  published
    property GenerateScript: Boolean read fGenerateScript write fGenerateScript default True;
    property Connect: Boolean read fConnect write fConnect default True;
    property SQLDialect: Boolean read fSQLDialect write fSQLDialect default True;
    property DBCharSet: Boolean read fDBCharSet write fDBCharSet default True;
    property LocalSQL: Boolean read fLocalSQL write fLocalSQL default False;
    property FloatFormat: String read fFloatFormat write fFloatFormat;
    property DateFormat: String read fDateFormat write fDateFormat;
    property TimeFormat: String read fTimeFormat write fTimeFormat;
    property DateTimeFormat: String read fDateTimeFormat write fDateTimeFormat;
  end;


implementation

//The full source code is available on purchasing the product

end.
